<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<title>
 Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
	
		parent.document.title="jquery.xslt.js Overview";
	
}
</script>
</head>
<body bgcolor="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> 	<font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top">
<em>
<b></b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<center>
	
	   <h2>jquery.xslt.js</h2>
	
</center>

	


<h4>Summary</h4>
<p>
	
		No overview generated for 'jquery.xslt.js'<BR/><BR/>
	
</p>

<hr>



<!-- ========== METHOD SUMMARY =========== -->

<!-- ========== END METHOD SUMMARY =========== -->


        <pre class="sourceview"><span class="comment">/*
 * jquery.xslt.js
 *
 * Copyright (c) 2005-2008 Johann Burkard (&lt;mailto:jb<span class="attrib">@eaio</span>.com&gt;)
 * &lt;http://eaio.com&gt;
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
 * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 * USE OR OTHER DEALINGS IN THE SOFTWARE.
 * 
 */</span>
 
<span class="comment">/**
 * jQuery client-side XSLT plugins.
 * 
 * <span class="attrib">@author</span> &lt;a href="mailto:jb<span class="attrib">@eaio</span>.com"&gt;Johann Burkard&lt;/a&gt;
 * <span class="attrib">@version</span> $Id: jquery.xslt.js,v 1.10 2008/08/29 21:34:24 Johann Exp $
 */</span>
(<span class="reserved">function</span>($) {
    $.fn.xslt = <span class="reserved">function</span>() {
        <span class="reserved">return</span> <span class="reserved">this</span>;
    }
    var str = /^\s*&lt;/;
    <span class="reserved">if</span> (document.recalc) { <span class="comment">// IE 5+</span>
        $.fn.xslt = <span class="reserved">function</span>(xml, xslt) {
            var target = $(<span class="reserved">this</span>);
                
            var change = <span class="reserved">function</span>() {
                var c = <span class="literal">'complete'</span>;
                <span class="reserved">if</span> (xm.readyState == c &amp;&amp; xs.readyState == c) {
                        window.setTimeout(<span class="reserved">function</span>() {
                            target.html(xm.transformNode(xs.XMLDocument));
                        }, 50);
                }
            };

            var xm = document.createElement(<span class="literal">'xml'</span>);
            xm.onreadystatechange = change;
            xm[str.test(xml) ? <span class="literal">"innerHTML"</span> : <span class="literal">"src"</span>] = xml;

            var xs = document.createElement(<span class="literal">'xml'</span>);
            xs.onreadystatechange = change;
            xs[str.test(xslt) ? <span class="literal">"innerHTML"</span> : <span class="literal">"src"</span>] = xslt;

            $(<span class="literal">'body'</span>).append(xm).append(xs);
            <span class="reserved">return</span> <span class="reserved">this</span>;
       };
    }
    <span class="reserved">else</span> <span class="reserved">if</span> (window.DOMParser != undefined &amp;&amp; window.XMLHttpRequest != undefined &amp;&amp; window.XSLTProcessor != undefined) { <span class="comment">// Mozilla 0.9.4+, Opera 9+</span>
       var processor = new XSLTProcessor();
       var support = false;
       <span class="reserved">if</span> ($.isFunction(processor.transformDocument)) {
           support = window.XMLSerializer != undefined;
       }
       <span class="reserved">else</span> {
           support = true;
       }
       <span class="reserved">if</span> (support) {
            $.fn.xslt = <span class="reserved">function</span>(xml, xslt) {
                var target = $(<span class="reserved">this</span>);
                var transformed = false;

                var xm = {
                    readyState: 4
                };
                var xs = {
                    readyState: 4
                };

                var change = <span class="reserved">function</span>() {
                    <span class="reserved">if</span> (xm.readyState == 4 &amp;&amp; xs.readyState == 4  &amp;&amp; !transformed) {
                        var processor = new XSLTProcessor();
                        <span class="reserved">if</span> ($.isFunction(processor.transformDocument)) {
                            <span class="comment">// obsolete Mozilla interface</span>
                            resultDoc = document.implementation.createDocument(<span class="literal">""</span>, <span class="literal">""</span>, null);
                            processor.transformDocument(xm.responseXML, xs.responseXML, resultDoc, null);
                            target.html(new XMLSerializer().serializeToString(resultDoc));
                        }
                        <span class="reserved">else</span> {
                            processor.importStylesheet(xs.responseXML);
                            resultDoc = processor.transformToFragment(xm.responseXML, document);
                            target.empty().append(resultDoc);
                        }
                        transformed = true;
                    }
                };

                <span class="reserved">if</span> (str.test(xml)) {
                    xm.responseXML = new DOMParser().parseFromString(xml, <span class="literal">"text/xml"</span>);
                }
                <span class="reserved">else</span> {
                    xm = $.ajax({ dataType: <span class="literal">"xml"</span>, url: xml});
                    xm.onreadystatechange = change;
                }

                <span class="reserved">if</span> (str.test(xslt)) {
                    xs.responseXML = new DOMParser().parseFromString(xslt, <span class="literal">"text/xml"</span>);
                    change();
                }
                <span class="reserved">else</span> {
                    xs = $.ajax({ dataType: <span class="literal">"xml"</span>, url: xslt});
                    xs.onreadystatechange = change;
                }
                <span class="reserved">return</span> <span class="reserved">this</span>;
            };
       }
    }
})(jQuery);
</pre>
	<hr>



<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top"><em>
<b></b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<font size="-1">

</font>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Fri Aug 29 23:41:18 2008</div>
</body>
</html>
